{% extends 'base.html.twig' %}

{% block title %}Post{% endblock %}

{% block body %}
    <h1>Post</h1>

    <table class="table">
        <tbody>
            <tr>
                <th>Id</th>
                <td>{{ post.id }}</td>
            </tr>
            <tr>
                <th>Title</th>
                <td>{{ post.title }}</td>
            </tr>
            <tr>
                <th>Slug</th>
                <td>{{ post.slug }}</td>
            </tr>
            <tr>
                <th>Summary</th>
                <td>{{ post.summary }}</td>
            </tr>
            <tr>
                <th>Content</th>
                <td>{{ post.content }}</td>
            </tr>
            <tr>
                <th>PublishedAt</th>
                <td>{{ post.publishedAt ? post.publishedAt|date('Y-m-d H:i:s') : '' }}</td>
            </tr>
        </tbody>
    </table>

    <a href="{{ path('app_post_index') }}">back to list</a>

    <a href="{{ path('app_post_edit', {'id': post.id}) }}">edit</a>

    {{ include('post/_delete_form.html.twig') }}
{% endblock %}
